package com.hualan.dao;

import com.hualan.Util.DBUtils;
import com.hualan.bean.PanghuShopGoods;
import com.hualan.dao.PanghuGoodsShangJiaDao;

import java.util.List;
import java.util.Map;

public class PanghuGoodsShangJiaDaoImpl implements PanghuGoodsShangJiaDao {
    //查询goodsStatus全部为1的商品
    @Override
    public List selectShangJia() {
        String sql = "select * from panghu_shop_goods where goods_status = 1";
        //收取goodsStatus全部为1的商品
        List<PanghuShopGoods> query = DBUtils.query(sql, PanghuShopGoods.class);
        return query;
    }

    //查询goodsStatus全部为0的商品
    @Override
    public List selectXiaJia() {
        String sql = "select * from panghu_shop_goods where goods_status = 0";
        //收取goodsStatus全部为1的商品
        List<PanghuShopGoods> query = DBUtils.query(sql, PanghuShopGoods.class);
        return query;
    }
}
